package com.infitecs.eyas.develop.service;

import com.infitecs.eyas.develop.dao.PermissionDao;
import com.infitecs.eyas.develop.model.PermissionTreeNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("permissionService")
public class PermissionService {
    @Autowired
    private PermissionDao permissionDao;

    public List<PermissionTreeNode> getPermissionTree() {
        return permissionDao.getPermissionTree();
    }

    public List<PermissionTreeNode> getPermissionTreeByRoleName(String roleId) {
        return permissionDao.getPermissionTreeByRoleName(roleId);
    }


}
